package com.project.harmonyledger.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigInteger;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
  @TableId(type = IdType.AUTO)
  private BigInteger id;
  private String username;
  private String password;
  private String nickname;
  private String photo;
  private String email;
  private Date createdAt;
  private Date updatedAt;

  public User(String username, String password, String email) {
    this.username = username;
    this.password = password;
    this.email = email;
    this.createdAt = new Date();
    this.updatedAt = new Date();
  }

  public User(String username, String password, String nickname, String photo) {
    this.username = username;
    this.password = password;
    this.nickname = nickname;
    this.photo = photo;
  }
}
